{include file="public/layout" /}
<script src="__SKIN__/js/users_upgrade.js?v={$version}"></script>
<script type="text/javascript" src="__PUBLIC__/plugins/colpick/js/colpick.js"></script>
<link href="__PUBLIC__/plugins/colpick/css/colpick.css" rel="stylesheet" type="text/css"/>
<body class="bodystyle" style="overflow-y: scroll; cursor: default; -moz-user-select: inherit;">
<style type="text/css">
#picker {
    /*margin:0;*/
    /*padding:0;*/
    border:solid 1px {$info.theme_color|default='#ff6565'};
    width:70px;
    height:20px;
    border-right:40px solid green;
    /*line-height:20px;*/
} 
</style>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
{include file="member/left" /}
<div class="page" style="min-width:auto;margin-left:100px;">
    <!-- <div class="fixed-bar">
        <div class="item-title">
            <ul class="tab-base nc-row">
                {eq name="'Member@users_config'|is_check_access" value="1"}
                <li>
                    <a {if condition="in_array($Request.action, ['users_config'])"}class="current"{/if} href='{:url("Member/users_config")}'>
                        <span>功能配置</span>
                    </a>
                </li>
                {/eq}
            </ul>
        </div>
    </div> -->
    <div class="flexigrid">
        <form class="form-horizontal" id="postForm" action="{:url('Member/users_config')}" method="post">
            <div class="hDiv htitx">
                <div class="hDivBox">
                    <table cellspacing="0" cellpadding="0" style="width: 100%">
                        <thead>
                        <tr>
                            <th class="sign w10" axis="col0">
                                <div class="tc"></div>
                            </th>
                            <th abbr="article_title" axis="col3" class="w10">
                                <div class="tc">注册设置</div>
                            </th>
                            <th abbr="ac_id" axis="col4">
                                <div class=""></div>
                            </th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>

            <!-- config/users -->
            <div class="ncap-form-default">
                <dl class="row">
                    <dt class="tit">
                        <label for="uname">会员中心</label>
                    </dt>
                    <dd class="opt">
                        <label class="curpoin">
                            <input type="radio" name="users[users_open_register]" value="0" {if condition="!isset($info.users_open_register) || empty($info.users_open_register)"}checked="checked"{/if}/>开启
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin" title="关闭后将自动隐藏账户注册/登录的入口">
                            <input type="radio" name="users[users_open_register]" value="1" {if condition="$info.users_open_register == 1"}checked="checked"{/if}/>关闭
                        </label>
                    </dd>
                </dl>

                <dl class="row">
                    <dt class="tit">
                        <label for="uname">开启注册</label>
                    </dt>
                    <dd class="opt">
                        <label class="curpoin">
                            <input type="radio" name="users[users_open_reg]" value="0" {if condition="!isset($info.users_open_reg) || empty($info.users_open_reg)"}checked="checked"{/if}/>开启
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin" title="关闭后将自动隐藏账户注册的入口">
                            <input type="radio" name="users[users_open_reg]" value="1" {if condition="$info.users_open_reg == 1"}checked="checked"{/if}/>关闭
                        </label>
                    </dd>
                </dl>

                <dl class="row" id="users_verification_dl" {if condition='!empty($info.users_open_reg) && $info.users_open_reg == 1'}style="display: none;"{/if}>
                    <dt class="tit">
                        <label for="username">注册验证</label>
                    </dt>
                    <dd class="opt" style="line-height: 26px;">
                        <label class="curpoin">
                            <input type="radio" name="users[users_verification]" value="0" {if condition="!isset($info.users_verification) || empty($info.users_verification)"}checked="checked"{/if}/>不验证
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin" title="注册会员后，需后台审核激活后才能登录">
                            <input type="radio" name="users[users_verification]" value="1" {if condition="$info.users_verification == 1"}checked="checked"{/if}/>后台激活
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin" title="注册会员时，发送邮箱验证码校验才能注册">
                            <input type="radio" name="users[users_verification]" value="2" onclick="email(1);" {if condition="$info.users_verification == 2"}checked="checked"{/if}/>邮件验证
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin" title="注册会员中，发送手机验证码校验才能注册">
                            <input type="radio" name="users[users_verification]" value="3" onclick="mobile(1);" {if condition="$info.users_verification == 3"}checked="checked"{/if}/>手机验证
                        </label>
                        <p class="notic">邮件验证和手机验证需要正确配置后才能使用，请去基本信息-接口配置，配置电子邮箱或云短信</p>
                    </dd>
                </dl>

                <dl class="row">
                    <dt class="tit">
                        <label for="username">找回密码</label>
                    </dt>
                    <dd class="opt" style="line-height: 26px;">
                        <label class="curpoin">
                            <input type="radio" name="users[users_retrieve_password]" value="1" onclick="email(2, this);" {if condition="isset($info.users_retrieve_password) && $info.users_retrieve_password == 1"}checked="checked"{/if}/>邮件验证
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin">
                            <input type="radio" name="users[users_retrieve_password]" value="2" onclick="mobile(2, this);" {if condition="isset($info.users_retrieve_password) && $info.users_retrieve_password == 2"}checked="checked"{/if}/>手机验证
                        </label>
                        <p class="notic">邮件验证和手机验证需要正确配置后才能使用，请去基本信息-接口配置，配置电子邮箱或云短信</p>
                    </dd>
                </dl>

                <dl class="row">
                    <dt class="tit">
                        <label for="username">禁止注册用户名</label>
                    </dt>
                    <dd class="opt" style="line-height: 26px;">
                        <textarea rows="5" cols="60" name="users[users_reg_notallow]" style="height:60px;">{$info.users_reg_notallow|default='www,bbs,ftp,mail,user,users,admin,administrator,eyoucms'}</textarea>
                        <p class="notic">前台注册时禁止注册的用户名列表，以逗号(,)分隔开</p>
                    </dd>
                </dl>
            </div>
            <div class="hDiv htitx">
                <div class="hDivBox">
                    <table cellspacing="0" cellpadding="0" style="width: 100%">
                        <thead>
                        <tr>
                            <th class="sign w10" axis="col0">
                                <div class="tc"></div>
                            </th>
                            <th abbr="article_title" axis="col3" class="w10">
                                <div class="tc">登录设置</div>
                            </th>
                            <th abbr="ac_id" axis="col4">
                                <div class=""></div>
                            </th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>

            <div class="ncap-form-default">
                <dl class="row">
                    <dt class="tit">
                        <label for="users_login_expiretime">前台登录超时</label>
                    </dt>
                    <dd class="opt">
                        <input id="users_login_expiretime" name="users[users_login_expiretime]" value="{$info.users_login_expiretime|default=config('login_expire')}" autocomplete="off" type="text" style="width: 200px;" />&nbsp;(秒)
                        <input type="hidden" name="users[login_expiretime_old]" value="{$info.users_login_expiretime|default=0}">
                        <p class="notic">默认3600秒等于1小时，最多不超过1个月（2592000秒）</p>
                        <p class="notic2 none red" id="tips_users_login_expiretime"></p>
                    </dd>
                </dl>
                <dl class="row">
                    <dt class="tit">
                        <label for="username">登录后跳转</label>
                    </dt>
                    <dd class="opt" style="line-height: 26px;">
                        <label class="curpoin">
                            <input type="radio" name="users[users_login_jump_type]" value="1" onclick="$('#login_jump_url_dl').hide();" {if condition="!empty($info.users_login_jump_type) && $info.users_login_jump_type == 1"}checked="checked"{/if}/>首页
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin">
                            <input type="radio" name="users[users_login_jump_type]" value="2" onclick="$('#login_jump_url_dl').hide();" {if condition="!isset($info.users_login_jump_type) || $info.users_login_jump_type == 2"}checked="checked"{/if}/>当前页
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin">
                            <input type="radio" name="users[users_login_jump_type]" value="3" onclick="$('#login_jump_url_dl').hide();" {if condition="!empty($info.users_login_jump_type) && $info.users_login_jump_type == 3"}checked="checked"{/if}/>会员中心
                        </label>
                        &nbsp;&nbsp;&nbsp;
                        <label class="curpoin">
                            <input type="radio" name="users[users_login_jump_type]" value="4" onclick="$('#login_jump_url_dl').show();" {if condition="!empty($info.users_login_jump_type) && $info.users_login_jump_type == 4"}checked="checked"{/if}/>自定义链接
                        </label>
                    </dd>
                </dl>
                <dl class="row {neq name='$info.users_login_jump_type' value='4'}none{/neq}" id="login_jump_url_dl">
                    <dt class="tit">
                        <label></label>
                    </dt>
                    <dd class="opt">
                        <input name="users[users_login_jump_url]" value="{$info.users_login_jump_url|default=''}" autocomplete="off" placeholder="http://" type="text" class="input-txt"/>
                        <p class="notic">请填写完整的链接</p>
                    </dd>
                </dl>
            </div>
            <!-- config/theme -->
            {eq name="'UsersRelease@conf'|is_check_access" value="1"}
                {if condition="1 == $userConfig.users_open_release"}
                    <div class="hDiv htitx">
                        <div class="hDivBox">
                            <table cellspacing="0" cellpadding="0" style="width: 100%">
                                <thead>
                                <tr>
                                    <th class="sign w10" axis="col0">
                                        <div class="tc"></div>
                                    </th>
                                    <th abbr="article_title" axis="col3" class="w10">
                                        <div class="tc">
                                            {notempty name="$is_eyou_authortoken"}<i class="anchor-icon anchor-icon-biao" title="限授权域名可用"></i>{/notempty}投稿设置
                                        </div>
                                    </th>
                                    <th abbr="ac_id" axis="col4">
                                        <div class=""></div>
                                    </th>
                                </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                    <div class="ncap-form-default {notempty name="$is_eyou_authortoken"} page on-off_show {/notempty}">
                        <div class="on-off_shade {empty name="$is_eyou_authortoken"} none {/empty}">
                            <div class="on-off_shadeCon">
                                <span>限授权域名使用，<a href="https://www.eyoucms.com/buy/" target="_blank">购买授权</a></span>
                            </div>
                        </div>
                        <dl class="row">
                            <dt class="tit">
                                <label>投稿自动审核</label>
                            </dt>
                            <dd class="opt" style="line-height: 26px;">
                                <label class="curpoin">
                                    <input type="radio" name="users[is_automatic_review]" value="1" {if condition="isset($info.is_automatic_review) && $info.is_automatic_review == 1"}checked="checked"{/if}/>开启
                                </label>
                                &nbsp;&nbsp;&nbsp;
                                <label class="curpoin" title="关闭后将自动隐藏账户注册/登录的入口">
                                    <input type="radio" name="users[is_automatic_review]" value="0" {if condition="!isset($info.is_automatic_review) || empty($info.is_automatic_review)"}checked="checked"{/if}/>关闭
                                </label>
                                <p class="notic">开启后会员投稿将直接展示到前台文档列表</p>
                            </dd>
                        </dl>

                        <dl class="row">
                            <dt class="tit">
                                <label>投稿次数限制</label>
                            </dt>
                            <dd class="opt">
                                <label class="curpoin">
                                    <input name="users[is_open_posts_count]" value="1" type="radio"  {if condition="isset($info.is_open_posts_count) && $info.is_open_posts_count == 1"} checked="checked"{/if}>开启
                                </label>
                                <label class="curpoin">
                                &nbsp;&nbsp;&nbsp;
                                    <input name="users[is_open_posts_count]" value="0" type="radio" {if condition="!isset($info.is_open_posts_count) || empty($info.is_open_posts_count)"} checked="checked" {/if}>关闭
                                </label>
                                <a {if condition='!isset($info.is_open_posts_count) || empty($info.is_open_posts_count)'}style="display: none;"{/if} id='UpUsersLevelBout' href="javascript:void(0);" onclick="UpUsersLevelBout();" class="ml10 ncap-btn ncap-btn-green">设置次数</a>
                                <p class="notic">开启后可设置会员每日的投搞数量</p>
                            </dd>
                        </dl>

                        <dl class="row">
                            <dt class="tit">
                                <label for="title" id="select_title">投稿栏目选择</label>
                            </dt>
                            <dd class="opt">
                                <select name="release_typeids[]" style="width: 300px;" size="15" multiple="true">
                                    {$release_select_html}
                                </select>
                                <span class="err"></span>
                                <p class="notic2 red">(按 Ctrl 可以进行多选)</p>
                            </dd>
                        </dl>
                    </div>
                    <script type="text/javascript">
                        $(function(){
                            //关闭注册隐藏注册验证
                            $('input[name="users[users_open_reg]"]').click(function(){
                                var users_open_reg = $(this).val();
                                if (1 == users_open_reg) {
                                    $('#users_verification_dl').hide();
                                } else {
                                    $('#users_verification_dl').show();
                                }
                            });
                            $('input[name="users[is_open_posts_count]"]').click(function(){
                                var is_open_posts_count = $(this).val();
                                if (1 == is_open_posts_count) {
                                    $('#UpUsersLevelBout').show();
                                } else {
                                    $('#UpUsersLevelBout').hide();
                                }
                            });
                        });

                        function UpUsersLevelBout()
                        {
                            var url = "{:url('UsersRelease/ajax_users_level_bout')}";
                            //iframe窗
                            layer.open({
                                type: 2,
                                title: '会员投稿次数设置',
                                fixed: true, //不固定
                                shadeClose: false,
                                shade: layer_shade,
                                maxmin: true, //开启最大化最小化按钮
                                area: ['50%', '80%'],
                                content: url
                            });
                        }
                    </script>
                {/if}
            {/eq}
            <!-- config/theme -->
            <div class="hDiv htitx">
                <div class="hDivBox">
                    <table cellspacing="0" cellpadding="0" style="width: 100%">
                        <thead>
                        <tr>
                            <th class="sign w10" axis="col0">
                                <div class="tc"></div>
                            </th>
                            <th abbr="article_title" axis="col3" class="w10">
                                <div class="tc">前台风格设置</div>
                            </th>
                            <th abbr="ac_id" axis="col4">
                                <div class=""></div>
                            </th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
            <div class="ncap-form-default">
                <dl class="row">
                    <dt class="tit">标签调用</dt>
                    <dd class="opt">
                        <a href="javascript:void(0);" onclick="tag_call('web_users_switch');" class="ncap-btn ncap-btn-green">查看教程</a>
                    </dd>
                </dl>

                {neq name='$usersTplVersion' value='v3'}
                <dl class="row">
                    <dt class="tit">
                        <label for="uname">{eq name='$usersTplVersion' value='v2'}PC左侧菜单{else /}左侧菜单{/eq}</label>
                    </dt>
                    <dd class="opt">
                        <a href="javascript:void(0);" onclick="menu_index();" class="ncap-btn ncap-btn-green">管理</a>
                    </dd>
                </dl>
                {/neq}

                {eq name='$usersTplVersion' value='v2'}
                <dl class="row">
                    <dt class="tit">
                        <label for="uname">WAP底部菜单</label>
                    </dt>
                    <dd class="opt">
                        <a href="javascript:void(0);" onclick="bottom_menu_index();" class="ncap-btn ncap-btn-green">管理</a>
                    </dd>
                </dl>
                {/eq}
                <dl class="row">
                    <dt class="tit">
                        <label for="uname">主题颜色</label>
                    </dt>
                    <dd class="opt">
                        <input type="text" name="theme[theme_color]" value="{$info.theme_color|default='#ff6565'}" id="picker" style="border-color: {$info.theme_color|default='#ff6565'};" />
                    </dd>
                </dl>
                <dl class="row">
                    <dt class="tit">
                        <label for="web_users_tpl_theme">模板风格</label>
                    </dt>
                    <dd class="opt">
                        <select name="web[web_users_tpl_theme]">
                            <option value="">默认风格</option>
                            {volist name='$tpl_theme_list' id='vo'}
                                {notin name="$vo" value="users"}
                                <option value="{$vo}" {eq name='$web_users_tpl_theme' value='$vo'}selected{/eq}>{$vo}</option>
                                {/notin}
                            {/volist}
                        </select>
                        &nbsp;<a href="JavaScript:void(0);" onclick="click_to_eyou_1575506523('https://www.eyoucms.com/plus/view.php?aid=11017&origin_eycms=1','如何制作可切换的会员中心模板？')" style="font-size: 12px;padding-left: 38px;position:absolute;top: 18px;">查看教程？</a>
                        <p class="notic"></p>
                    </dd>
                </dl>
            </div>

            <div class="ncap-form-default">
                <dl class="row">
                    <div class="bot">
                        <a href="JavaScript:void(0);" onclick="usersset();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
                    </div>
                </dl>
            </div>

        </form>
    </div>
</div>
<script>
    $(document).ready(function(){
        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function(){
            $(this).toggleClass('trSelected');
        });

        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });

        // 颜色选择
        $('#picker').colpick({
            flat:false,
            layout:'rgbhex',
            submit:0,
            colorScheme:'light',
            color:$('#picker').val(),
            onChange:function(hsb,hex,rgb,el,bySetColor) {
                $(el).css('border-color','#'+hex);
                // Fill the text box just if the color was set using the picker, and not the colpickSetColor function.
                if(!bySetColor) $(el).val('#'+hex);
            }
        }).keyup(function(){
            $(this).colpickSetColor('#'+this.value);
        });

        //前台登录超时
        $('#users_login_expiretime').keyup(function(){
            var users_login_expiretime = $(this).val();
            if (users_login_expiretime > 2592000) {
                $(this).val(2592000);
                $('#tips_users_login_expiretime').html('最多不能设置超过一个月（2592000秒）').show();
            } else if (users_login_expiretime < 60) {
                $('#tips_users_login_expiretime').html('最少不能设置低于60秒').show();
            } else {
                $('#tips_users_login_expiretime').hide();
            }
        });
    });

    function email(source, obj) {
        $.ajax({
            url: "{:url('Member/ajax_users_config_email')}",
            type: 'GET',
            dataType: 'JSON',
            data: {_ajax:1},
            success: function(res){
                if (res.code == 0) {
                    if (1 == source) {
                        $("input[name='users[users_verification]'][value=0]").attr("checked", "checked");
                        layer.alert(res.msg, {
                            shade: layer_shade,
                            area: ['480px', '190px'],
                            move: false,
                            title: '提示',
                            btnAlign:'r',
                            closeBtn: 3,
                            btn: ['确定'] ,//按钮
                            success: function () {
                                $(".layui-layer-content").css('text-align', 'left');
                            }
                        });
                        return false;
                    } else {
                        $(obj).removeAttr('checked');
                        layer.alert(res.msg, {
                            shade: layer_shade,
                            area: ['480px', '190px'],
                            move: false,
                            title: '提示',
                            btnAlign:'r',
                            closeBtn: 3,
                            btn: ['确定'] ,//按钮
                            success: function () {
                                $(".layui-layer-content").css('text-align', 'left');
                            }
                        });
                        return false;
                    }
                }
            },
            error: function(e){
                showErrorMsg(e.responseText);
                $(obj).removeAttr('checked');
                return false;
            }
        });
    }

    function mobile(source, obj) {
        $.ajax({
            url: "{:url('Member/ajax_users_config_mobile')}",
            type: 'GET',
            dataType: 'JSON',
            data: {_ajax:1},
            success: function(res){
                if (res.code == 0) {
                    if (1 == source) {
                        $("input[name='users[users_verification]'][value=0]").attr("checked", "checked");
                        layer.alert(res.msg, {
                            shade: layer_shade,
                            area: ['480px', '190px'],
                            move: false,
                            title: '提示',
                            btnAlign:'r',
                            closeBtn: 3,
                            btn: ['确定'] ,//按钮
                            success: function () {
                                $(".layui-layer-content").css('text-align', 'left');
                            }
                        });
                        return false;
                    } else {
                        $(obj).removeAttr('checked');
                        layer.alert(res.msg, {
                            shade: layer_shade,
                            area: ['480px', '190px'],
                            move: false,
                            title: '提示',
                            btnAlign:'r',
                            closeBtn: 3,
                            btn: ['确定'] ,//按钮
                            success: function () {
                                $(".layui-layer-content").css('text-align', 'left');
                            }
                        });
                        return false;
                    }
                }
            },
            error: function(e){
                showErrorMsg(e.responseText);
                $(obj).removeAttr('checked');
                return false;
            }
        });
    }

    function menu_index()
    {
        var url = "{:url('Member/ajax_menu_index')}";
        //iframe窗
        layer.open({
            type: 2,
            title: '前台会员中心左侧菜单',
            fixed: true, //不固定
            shadeClose: false,
            shade: layer_shade,
            maxmin: true, //开启最大化最小化按钮
            area: ['90%', '90%'],
            content: url
        });
    }

    function bottom_menu_index()
    {
        var url = "{:url('Member/ajax_bottom_menu_index')}";
        //iframe窗
        layer.open({
            type: 2,
            title: '前台会员中心手机端底部菜单',
            fixed: true, //不固定
            shadeClose: false,
            shade: layer_shade,
            maxmin: true, //开启最大化最小化按钮
            area: ['90%', '90%'],
            content: url
        });
    }

    function usersset(){
        var users_open_release = {$userConfig.users_open_release|default=0};

        // 前台登录超时
        var users_login_expiretime_obj = $('#users_login_expiretime');
        if (users_login_expiretime_obj.val() < 60) {
            showErrorMsg('前台登录超时不能少于60秒！');
            users_login_expiretime_obj.focus();
            return false;
        }

        layer_loading('正在处理');
        $.ajax({
            type : 'post',
            url : "{:url('Member/users_config', ['_ajax'=>1])}",
            data : $('#postForm').serialize(),
            dataType : 'json',
            success : function(res){
                if(res.code == 1){
                    var php_servicemeal = {$php_servicemeal|default=0};
                    if (1 == users_open_release && php_servicemeal > 0) {
                        saveReleaseConf(res.msg);
                    } else {
                        layer.closeAll();
                        layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
                            window.location.reload();
                        });
                    }
                }else{
                    layer.closeAll();
                    showErrorAlert(res.msg);
                }
            },
            error: function(e){
                layer.closeAll();
                showErrorAlert(e.responseText);
            }
        });
    }

    function saveReleaseConf(msg)
    {
        var is_automatic_review = $("input[name='users[is_automatic_review]']:checked").val();
        var is_open_posts_count = $("input[name='users[is_open_posts_count]']:checked").val();
        var release_typeids = '';
        var k = 0;
        $('select[name^=release_typeids]').each(function(i,o){
            if (k > 0) {
                release_typeids += ',';
            }
            release_typeids += $(o).val();
            k++;
        })
        $.ajax({
            type : 'get',
            url : "{:url('UsersRelease/conf', ['_ajax'=>1])}",
            data : {is_automatic_review:is_automatic_review, is_open_posts_count:is_open_posts_count, release_typeids:release_typeids},
            dataType : 'json',
            success : function(res){
                layer.closeAll();
                if(res.code == 1){
                    layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
                        window.location.reload();
                    });
                }else{
                    var msg = res.msg;
                    msg = msg.replace('该功能', '投稿设置');
                    showErrorAlert(msg);
                }
            },
            error: function(e){
                layer.closeAll();
                showErrorAlert(e.responseText);
            }
        });
    }

    function tag_call(name)
    {
        $.ajax({
            type: "POST",
            url: "{:url('System/ajax_tag_call', ['_ajax'=>1])}",
            data: {name:name},
            dataType: 'json',
            success: function (res) {
                if(res.code == 1){
                    //询问框
                    var confirm = layer.confirm(res.data.msg, {
                            shade: layer_shade,
                            area: ['70%', '80%'],
                            move: false,
                            title: '标签调用教程',//$(obj).attr('data-username'),
                            btnAlign:'r',
                            closeBtn: 3,
                            btn: ['确定'], //按钮
                            success: function () {
                                  $(".layui-layer-content").css('text-align', 'left');
                              }

                        }, function(){
                            layer.close(confirm);
                        }
                    );
                }else{
                    layer.alert(res.msg, {icon: 2, title:false});
                }
            },
            error:function(e){
                layer.alert(e.responseText, {icon: 2, title:false});
            }
        });
    }
</script>

{include file="public/footer" /}